Part Number Hot Search : 
ICOND MC4044P BR3510W 4C08A CXX0G DFB20T C2259 SKND50E
Product Description
Full Text Search
 

To Download UM1695 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  may 2015 docid025531 rev 5 1/46 UM1695 user manual command set reference guide for "at full stack" for spwf01sx series of wi-fi modules introduction this document is a guide to the ?at full stack? command set, a firmware application embedded in the spwf01sx series of wi-fi modules. the ?at full stack? command set is a user-friendly interface of a complete tcp/ip stack supporting both direct links with wi-fi enable d devices and infrastructure communication modes with an access point. a pplication utilities such as an ht tp client and a web server are also featured in the softwa re to allow easy integratio n with many internet-based applications. this document provides a detailed description of each command supported by the ?at full stack? interface. a description and explanation of configuration variables, status variables and asynchronous indication messages are also integrated into the document, respectively, in chapter 3 , 4 and 5 . www.st.com
contents UM1695 2/46 docid025531 rev 5 contents 1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2 command reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1 at: attention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2 at+cfun: comm function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.3 at+s.help: display help text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.4 at+s.gcfg: get configuration value . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.5 at+s.scfg: set configuration value . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.6 at+s.ssidtxt: get/set a textual ssid . . . . . . . . . . . . . . . . . . . . . . . . . . .11 2.7 at&v: display all configuration values . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 2.8 at&f: restore factory default settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.9 at&w: save current settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.10 at+s.sts: report current status/statistics . . . . . . . . . . . . . . . . . . . . . . . . 14 2.11 at+s.peers: dump contents of the peer table . . . . . . . . . . . . . . . . . . . . 15 2.12 at+s.ping: send a ping to a specified host . . . . . . . . . . . . . . . . . . . . . . 16 2.13 at+s.sockon: open a network socket . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.14 at+s. sockw: write len bytes of data to socket . . . . . . . . . . . . . . . . . . . 17 2.15 at+s.sockq: query pending data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.16 at+s. sockr: return len bytes of data from socket . . . . . . . . . . . . . . . . 17 2.17 at+s.sockc: close socket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.18 at+s.tlscert: configure ssl/tls certificates . . . . . . . . . . . . . . . . . . . 18 2.19 at+s.tlscert2: cleanup ssl/tls certificate resources . . . . . . . . . . . 18 2.20 at+s.tlsdomain: set ca domain name. it must match the secured site name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.21 at+s.settime: initiate module reference time . . . . . . . . . . . . . . . . . . . . 19 2.22 at+s.sockd: enable/disable the socket server . . . . . . . . . . . . . . . . . . . 19 2.23 at+s.: command mode to data mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.24 at+s.httpget: issue an http get . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.25 at+s.httppost: issue an http post . . . . . . . . . . . . . . . . . . . . . . . . 21 2.26 at+s.fsc: create a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.27 at+s.fsa: append to an existing file . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
docid025531 rev 5 3/46 UM1695 contents 46 2.28 at+s.fsd: delete an existing file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.29 at+s.fsl: list existing filename(s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.30 at+s.fsp: print the contents of an existing file . . . . . . . . . . . . . . . . . . . . 24 2.31 at+s.wifi: enable/disable wi-fi device . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.32 at+s.roam: trigger wi-fi reassociation sequence . . . . . . . . . . . . . . . . 24 2.33 at+s.gpioc: configure general purpose inputs/outputs . . . . . . . . . . . . . 25 2.34 at+s.gpior: query general purpose input . . . . . . . . . . . . . . . . . . . . . . . 25 2.35 at+s.gpiow: set general purpose output . . . . . . . . . . . . . . . . . . . . . . . 26 2.36 at+s.fwupdate: perform a firmware update . . . . . . . . . . . . . . . . . . . . 26 2.37 at+s.httpdfsupdate: update static httpd filesystem . . . . . . . . . . 27 2.38 at+s.httpdfserase: erase the external flash memory . . . . . . . . . . . 27 2.39 at+s.httpd: disable/enable web server . . . . . . . . . . . . . . . . . . . . . . . . 27 2.40 at+s.scan: perform site survey (scan) . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.41 at+s.adc: read adc value on gpio8 . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.42 at+s.dac: enable/disable dac on gpio15 . . . . . . . . . . . . . . . . . . . . . . 29 2.43 at+s.pwm: set pwm on gpio1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3 configuration variable reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 4 status variable reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 5 asynchronous indication referen ce . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 6 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
overview UM1695 4/46 docid025531 rev 5 1 overview the ?at full stack? command interface described in this user guide consists of a set of: ? at-style commands, ? configuration variables, ? status variables, and ? asynchronous indications (also known as unsolicited responses or winds). the communication of commands, variables, and asynchronous indications is executed via the serial port and implies the integration of the spwf01sx modules with a host processor as indicated in figure 1 . figure 1. spwf01s integration with an host processor asynchronous indications may arrive at any time (except as noted below), and have the format: +wind:: the field of each asynchronous indica tion type is unique. the descriptive string may be safely ignored. immediately after reset, no commands should be sent and only asynchronous indications are present until the indication ?+wind :0:console active? is received. after wind:0 is received, at commands may be sent to the spwf device. at commands are alwa ys in the form of: at the at command line, up to the terminating , is sent from the host. the (optional) response lines followed by are sent from the module. the is one of the following: ok error: the at command handler allows for the at commands to be entered in upper or lower case. uart at commands conf. variables status variables asynchronous indications host (stm32/stm8)
docid025531 rev 5 5/46 UM1695 overview 46 command arguments are case sensitive. the maximum command length is 512 characters. note that asynchronous indications are blocked from the time the initia l ?a? is sent to the module until the line is sent. any indications generated from events during the processing of an at command are queued for delivery after the command is complete.
command reference UM1695 6/46 docid025531 rev 5 2 command reference this chapter details each of the at commands including brief descriptions of the behavior, syntax of the command, example of use and types of responses. the commands described are those listed in table 1 . table key: ? s: command is supported in this release ? ns: command is not supported in this release ? new: command is introdu ced with this release ? deprecated: command is deprecated in this release table 1. at command list summary ?at full stack? commands rel. 1.0 rel. 2.0 rel. 3.3 rel. 3.4 at ssss at+cfun s s s (1) s at+s.help s s s s at+s.gcfg s s s s at+s.scfg s s s s at+s.ssidtxt s s s s at&v ssss at&f ssss at&w ssss at+s.nvw s s deprecated ns at+s.sts ssss at+s.peers - new s s at+s.ping s s s s at+s.sockon s s s s at+s.sockos s s deprecated (2) ns at+s.sockw ssss at+s.sockq ssss at+s.sockr ssss at+s.sockc ssss at+s.sockd - - new s at+s. - - new s at+s.httpget s s s s at+s.httppost - new s s at+s.fsc ssss
docid025531 rev 5 7/46 UM1695 command reference 46 the following subsections cover each at command in detail. 2.1 at: attention at, by itself, is a null command that always return s an ok result code. it is useful for testing the module interface for readiness. arguments: none example: at+s.fsa ssss at+s.fsd ssss at+s.fsl ssss at+s.fsp ssss at+s.mfgtest s s deprecated ns at+s.pemdata s s deprecated ns at+s.wifi s s s s at+s.roam s s s s at+s.gpioc ssss at+s.gpior ssss at+s.gpiow ssss at+s.fwupdate (3) ssss at+s.httpdfsupdate (3) ssss at+s.httpdfserase (3) --news at+s.httpd - - new s at+s.scan - new s s at+s.adc ---new at+s.dac ---new at+s.pwm ---new at+s.tlscert ---new at+s.tlscert2 - - - new at+s.tlsdomain ---new at+s.settime ---new 1. extended to manage low power configuration modes 2. the use of uart 2 and uart 3 interfaces is disabled 3. command only supported on the hw versions spwf01sx.11 table 1. at command list summary (continued) ?at full stack? commands rel. 1.0 rel. 2.0 rel. 3.3 rel. 3.4
command reference UM1695 8/46 docid025531 rev 5 at ok 2.2 at+cfun: comm function at+cfun sets a power mode with default values as it is indicated in the table 2 and includes a reset of the device. arguments: example: at+cfun=1 +wind:2:reset 2.3 at+s.help: di splay help text at+s.help prints a list of all commands supported with a brief help text for each command. arguments: 0 = switch to the active state and reset the device 1 = keep the current state and reset the device 2 = switch to the powersave state and reset the device 3 = switch to the sleep state and reset the device 4 = switch to the standby mode and reset the device table 2. power states default configuration module states shortcut command stm32 states wlan states at variables default values active cfun 0 run rx idle rx active tx active at+s.scfg=sleep_enabled,0 at+s.scfg=wifi_powersave,0 at+s.scfg=standby_enabled,0 power save cfun 2 run ps or fast ps at+s.scfg=sleep_enabled,0 at+s.scfg=wifi_powersave,1 at+s.scfg=wifi_operational_mode,11 at+s.scfg=wifi_beacon_wakeup,1 at+s.scfg=wifi_listen_interval,0 sleep cfun 3 stop ps or fast ps at+s.scfg=sleep_enabled,1 at+s.scfg=wifi_powersave,1 at+s.scfg=wifi_operational_mode,11 at+s.scfg=wifi_beacon_wakeup,1 at+s.scfg=wifi_listen_interval,0 standby cfun 4 standby standby at+s.scfg=standby_enabled,1 at+s.scfg=standby_time,10 at+s.scfg=sleep_enabled,0
docid025531 rev 5 9/46 UM1695 command reference 46 none example: at+s.help # recognized commands # at -- null cmd, always returns ok # at+cfun =<0|1|2|3|4> -- enable common functionalities # at+s. -- switch to data mode # at+s.help -- this text # at&f -- restore factory default settings # at&v -- dump all settings # at&w -- save current settings to flash # at+s.gcfg = -- get config key # at+s.scfg =, -- set config key # at+s.sts [=] -- report current status/statistics # at+s.settime = -- set current time # at+s.fsc =,[,] -- create a file for httpd use # at+s.fsa =, -- append to an existing file # at+s.fsd = -- delete an existing file # at+s.fsl -- list existing filename(s) # at+s.fsp =[,,] -- print the contents of an existing file # at+s.gpioc =,[,<0|r|f|b>] -- configure specified gpio [optional irq] # at+s.gpior = -- read specified gpio # at+s.gpiow =, -- write specified gpio # at+s.dac =<0|value> -- disable/enable dac on gpio15 # at+s.adc [=raw] -- read [raw] adc value on gpio8 # at+s.pwm =frequency[,duty_cycle] -- set pwm on gpio1 # at+s.wifi =<0|1> -- disable/enable wifi # at+s.roam -- trigger a wifi roam # at+s.scan [=,] -- perform a scan ,. default is active,filter on # at+s.ssidtxt [=] -- set a textual ssid (not hex), otherwise prints current ssid # at+s.peers [=peer_number[,peer_var]] -- dump contents of the peer table # at+s.tlscert =, -- configure ssl/tls certificates # at+s.tlscert2 =clean, -- cleanup ssl/tls certificates resources # at+s.tlsdomain =, -- set ca domain name. it must match the secured site name exactly. # at+s.sockd =<0|port>[,] -- disable/enable socket server. default is tcp # at+s.sockon =,,[,ind] -- open a network socket # at+s.sockq = -- query socket for pending data
command reference UM1695 10/46 docid025531 rev 5 # at+s.sockc = -- close socket # at+s.sockw =, -- write data to socket # at+s.sockr =, -- read data from socket # at+s.httpd =<0|1> -- disable/enable web server # at+s.httpget =,[,port] -- http get of the given path to the specified host/port # at+s.httppost =,,[,port] -- http post of the given path to the specified host/port # at+s.httpdfserase -- erase the external httpd filesystem # at+s.httpdfsupdate =,[,port] -- download a new httpd filesystem from the specified host/port # at+s.fwupdate =,[,port] -- upgrade the onboard firmware from the specified host/port # at+s.ping = -- send a ping to a specified host ok 2.4 at+s.gcfg: get configuration value at+s.gcfg prints the value of one named configuration variable. see chapter 3: configuration variable reference for a list of available variable s. at&v provides the list of all variables and values on a running module. arguments: example: at+s.gcfg=ip_ipaddr # ip_ipaddr = 192.168.0.50 ok # ip_ipaddr = 192.168.10.10 ok name of the configuration variable name of the configuration variable value to store in the variable
docid025531 rev 5 11/46 UM1695 command reference 46 2.6 at+s.ssidtxt: get/set a textual ssid at+s.ssidtxt is a convenience command th at, when called with no arguments, returns the current value of wifi_ssid a nd wifi_ssid_len configuration va riables as a text string. all non-printable characters are displayed with t he '.' character. when called with an argument, the wifi_ssid and wifi_ssid_len configuration vari ables are set to the specified text string. ieee 802.11 and some access point implementati ons allow ssid values consisting of non- printable octet values, therefore the wifi_ssid va riable is set and stored as a sequence of octets (specified in hexadecimal) and wifi_ssid_len cannot be set based on any given flag value or delimiter. this command is only present as a convenience for those circumstances where the ssid is known to consist of printable characters. note: due to the spwf01sx command parser?s use of the comma ',' character as an argument delimiter, any ssid containing a comma must be set as a sequence of hexadecimal octets using the at+s.scfg command. arguments: example: at+s.ssidtxt=anssid ok at+s.gcfg=wifi_ssid # wifi_ssid = 41:6e:53:53:49:44:00:00:00:00:00:00:00:00:00:00:00:00:00: 00:00:00:00:00:00:00:00:00:00:00:00:00 ok at+s.gcfg=wifi_ssid_len # wifi_ssid_len = 6 ok example: at+s.ssidtxt ssid = 'anssid' ok 2.7 at&v: display all configuration values at&v prints the name and value of all configuration variables in the module. arguments: none example: at&v # dumping all configuration keys: # nv_manuf = st # nv_model = spwf01s # nv_serial = 0813015002 # nv_wifi_macaddr = 00:80:e1:aa:b9:ba # blink_led = 0 textual ssid [1-32 characters]
command reference UM1695 12/46 docid025531 rev 5 # wind_off_low = 0x00000000 # wind_off_medium = 0x00000000 # wind_off_high = 0x00000000 # user_desc = anonymous # escape_seq = at+s. # localecho1 = 0 # console1_speed = 115200 # console1_hwfc = 0 # console1_enabled = 1 # sleep_enabled = 0 # standby_enabled = 0 # standby_time = 10 # wifi_tx_msdu_lifetime = 0 # wifi_rx_msdu_lifetime = 0 # wifi_operational_mode = 0x00000011 # wifi_beacon_wakeup = 1 # wifi_beacon_interval = 100 # wifi_listen_interval = 0 # wifi_rts_threshold = 3000 # wifi_ssid = 53:54:54:65:73:74:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 :00:00:00:00:00:00:00 # wifi_ssid_len = 6 # wifi_txfail_thresh = 5 # wifi_ht_mode = 0 # wifi_channelnum = 6 # wifi_opr_rate_mask = 0x00003fcf # wifi_bas_rate_mask = 0x0000000f # wifi_mode = 1 # wifi_auth_type = 0 # wifi_atim_window = 0 # wifi_powersave = 0 # wifi_tx_power = 18 # wifi_rssi_thresh = 0 # wifi_rssi_hyst = 0 # wifi_ap_idle_timeout = 120 # wifi_beacon_loss_thresh = 10 # wifi_priv_mode = 0 # wifi_wep_keys[0] = 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 # wifi_wep_keys[1] = 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 # wifi_wep_keys[2] = 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 # wifi_wep_keys[3] = 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 # wifi_wep_key_lens = 00:00:00:00 # wifi_wep_default_key = 0
docid025531 rev 5 13/46 UM1695 command reference 46 # wifi_wpa_psk_raw = 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 :00:00:00:00:00:00:00 # wifi_wpa_psk_text = # ip_use_dhcp = 1 # ip_use_httpd = 1 # ip_mtu = 1500 # ip_hostname = iwm-aa-b9-ba # ip_apdomainname = captiveportal.net # ip_apredirect = firstset.html # ip_ipaddr = 192.168.0.50 # ip_netmask = 255.255.255.0 # ip_gw = 192.168.0.1 # ip_dns = 192.168.0.1 # ip_http_get_recv_timeout = 3000 # ip_wait_timeout = 12000 # ip_dhcp_timeout = 20 # ip_sockd_timeout = 250 ok 2.8 at&f: restore facto ry default settings at&f restores the factory default values of t he configuration variables and writes them to non-volatile storage. running this command is mandatory after every fw update. note: to perform the hw factory reset of the va riables, the pin gpio0 must be high during the powerup operation. arguments: none example: at&f ok 2.9 at&w: save current settings at&w stores the current ram-based settings to non-volatile storage. arguments: none example: at&w ok
command reference UM1695 14/46 docid025531 rev 5 2.10 at+s.sts: report cu rrent status/statistics at+s.sts displays the current values of all the status variables. arguments (optional): : displays the current value of the specified variable example: at+s.sts # status & statistics: # version = ******-*******-spwf01s # reset_reason = 4 # conf_flag = 5 # system_uptime = 2083 # system_sleeptime = 0 # gpio_enable = 0 # captiveportal = 0 # wifi_state=10 # wifi_bssid = 00:00:00:00:00:00 # wifi_aid = 0 # wifi_channelnum = 0 # wifi_sup_rate_mask=0x003fffcf # wifi_bas_rate_mask=0x0000000f # wifi_chan_activity2 = 0x00003ffe # wifi_max_tx_power=18 # wifi_reg_country = dk # wifi_dtim_period = 0 # wifi_sleeping = 0 # wifi_num_assoc = 0 # ip_ipaddr = 0.0.0.0 # ip_netmask = 0.0.0.0 # ip_gw = 0.0.0.0 # ip_dns = 0.0.0.0 # ip_sock_open = 0 # ip_sockd_port = 0 # free_heap = 24176 # min_heap = 23088 # current_time = 2083 ok at+s.sts=system_uptime # system_uptime = 7001 ok
docid025531 rev 5 15/46 UM1695 command reference 46 2.11 at+s.peers: dump contents of the peer table at+s.peers displays the current values of the pe er table. these values are useful to know additional information about the module connected to the ap or about the client connected to the module configured in mini ap mode. arguments (optional): : identifier of the peer : displays the current value of the specified peer variable example: at+s.peers - module connected to the ap # size of peer table: 1 # 0.link_id = 0 # 0.state = 4 # 0.addr = 02:62:1f:51:8f:08 # 0.last_rx = 6424 # 0.last_tx = 6379 # 0.rx_drops = 0 # 0.tx_drops = 0 # 0.rx_pkts = 64213 # 0.tx_pkts = 73426 # 0.tx_errs = 5 # 0.rate_mask = 0x00003fcf # 0.cur_rate_idx = 13 # 0.cur_rate_ok = 4 # 0.cur_rate_fail = 0 # 0.tx_consec_fail = 0 # 0.rx_seqnum = 0x0000f510 # 0.rx_seqnum_mc = 0x00004f80 # 0.rx_rssi = -33 # 0.rx_rateidx = 0 # 0.setprot = 3 # 0.listen_interval = 0 # 0.capinfo = 0x00000411 ok at+s.peers=0,rx_rssi # 0.rx_rssi = -33 ok
command reference UM1695 16/46 docid025531 rev 5 2.12 at+s.ping: send a pi ng to a specified host at+s.ping issues a single icmp echo request to the given host. arguments: example: at+s.ping=192.168.1.254 #ping: sendto 192.168.1.254 ok at+s.ping=example.com #ping: sendto 192.0.43.10 ok at+s.ping=nonexistent.example.com error: dns lookup failure at+s.ping=192.168.1.1 #ping: sendto 192.168.1.1 error: timed out 2.13 at+s.sockon: op en a network socket at+s. sockon opens a tcp/udp socket to ?myserver? on port ?xxxx? arguments: : target host. dns resolvable name or ip address : tcp/udp socket port : t for tcp socket, u for udp socket, s for secure socket ind: indicate when data has arrived (optional); this option requires to read the socket when a pending indication message is received. note: - up to 8 tcp or udp sockets can be opened contemporary. in this case it is strictly suggested to immediately empty the buffer (using sockr command) when a pending data is received. - up to 4 consecutive 730 bytes ?pending da ta? messages (w/o sockr) are guaranteed. to prevent data loss, it is suggested to empty the buffer by using the at+s.sockr command and to avoid exceeding 4 indications. - when a socket client receives an indication about socket server gone (only for tcp sockets, wind:58), the socket connection is no t automatically closed. moreover, both for tcp and udp sockets, flushing pending data (using the at+s.read command) is mandatory before closing the socket connecti on (at+s.sockc). if the buffer is not erased, the ?error: pending data? is raised. target host. dns resolvable name or ip address.
docid025531 rev 5 17/46 UM1695 command reference 46 example: at+s.sockon=myserver,1234,t id: 00 ok at+s.sockon=myserver,456,u,ind id: 01 ok 2.14 at+s. sockw: write len bytes of data to socket at+s. sockw allows to write data to socket. th is command accepts data after the at the end of the command line. the host is expected to supply characters of data after the end of the command line. note: when the ok token has not been received is really important to handle properly the error stage. in fact, the "at+sockw" command is not re entrant. if bytes are lost during data transfer over the uart, the module remains in waiting stage for incoming bytes. arguments: : socket identifier : data length to send (in bytes), up to 4096 bytes example: at+s.sockw=00,11 test_socket ok 2.15 at+s.sockq: query pending data at+s.sockq returns the number of bytes of data waiting on socket. arguments: : socket identifier example: at+s.sockq=01 datalen: 12 ok 2.16 at+s. sockr: return len bytes of data from socket at+s. sockr allows to read data from socket. arguments: : socket identifier : data length to read example:
command reference UM1695 18/46 docid025531 rev 5 at+s.sockr=01,12 test_socket1 ok 2.17 at+s.sockc: close socket the sockc command allows to close socket. note: both for tcp and udp sockets, flushing pe nding data (using the at+s.read command) is mandatory before closing the socket connecti on (at+s.sockc). if the buffer is not erased, the ?error: pending data? is raised. arguments: : socket identifier example: at+s.sockc=00 ok 2.18 at+s.tlscert: config ure ssl/tls certificates at+s.tlscert allows to store the certific ates in the flash memory of the module. note: refer to the ssl/tls application note for details arguments: : store the ca certificate, the client certificate or the key file (pem format) : size of the certificate 2.19 at+s.tlscert2: cleanup ss l/tls certificate resources at+s.tlscert2 allows to clean the certific ates in the flash memory of the module. note: refer to the ssl/tls application note for details arguments: : clean the ca certificate, the client certificate, the key file, the server domain or all 2.20 at+s.tlsdomain: set ca doma in name. it must match the secured site name the tlsdomain command allows to store the certification aut hority domain name in the flash memory of the module. note: refer to the ssl/tls application note for details arguments: : store the ca domain in the flash memory : domain name of the certification authority
docid025531 rev 5 19/46 UM1695 command reference 46 2.21 at+s.settime: initia te module reference time the settime command allows to set the re ference time used for secure socket connections. the module reference time must be initialized after each module reset. the time refers to utc format an d must be expressed as the time in seconds since 1970-jan- 01. note: refer to the ssl/tls application note for details arguments: : set the reference time in seconds 2.22 at+s.sockd: enable/dis able the socket server the sockd command enables the socket server listening on incoming connection on the "xxx"port. when the port argument is equal to zero, the command is used to turn off the socket server. arguments: : server listening port (from 1 to 65634, 0 to disable the socket server) t for tcp, u for udp protocol. default is tcp. example: - listening on port 32000 using tcp. at+s.sockd=32000 ok - listening on port 32000 using udp at+s.sockd=32000,u ok - turn off the socket server at+s.sockd=0 ok 2.23 at+s.: command mode to data mode the at+s. command allows switching from command mode to data mode. arguments:
command reference UM1695 20/46 docid025531 rev 5 note: the switch from data mode to command mode switch can be done by using the ?at+s.? escape sequence. this sequence can be customized by using the escape_seq configuration variable. the sequence is case-sensitive and it must be sent in a single complete packet with no cr or lf in the sequence . example: +wind:59:back to command mode at+s. +wind:60:now in data mode 2.24 at+s.httpget: is sue an http get at+s.httpget performs a single http get request to the named host and path. the get request and server response are printed on the module?s console. any url-encoding required for special characters in the argument must be performed by the host prior to command submission. note: note: the pairs in the example responses below are part of the data sent from the server and not inserted by the module. arguments: example: at+s.httpget=host.example.com,/index.html get /index.html http/1.0 user-agent: spwf01s host: 192.168.0.103 connection: close http/1.0 200 ok server: lwip/1.3.1 (http://savannah.nongnu.org/projects/lwip) content-type: text/html spwf01sx.11

st spwf01sx.11 wifi module

welcome to the st spwf01sx.11 wifi module.

target host. dns resolvable name or ip address. document path and optional query arguments target host port. optional.
docid025531 rev 5 21/46 UM1695 command reference 46

this page was delivered from the spwf01sx.11 internal http server.

spwf01sx.11 configuration settings page

spwf01sx.11 status page

ok at+s.httpget=nonexistent.example.com,/ error: host not found 2.25 at+s.httppost: issue an http post the http post performs a post of the given path to the specified host. the module can be only used as an http post client. arguments: : target host. dns resolvable name or ip address : document path : form to be submitted :target host port. optional example: at+s.httppost=posttestserver.com,/post.php,name=demo&email=mymail&subject= subj&body=message http/1.1 200 ok date: wed, 22 jan 2014 15:36:18 gmt server: apache access-control-allow-origin: * vary: accept-encoding content-length: 141 connection: close content-type: text/html successfully dumped 4 post variables. view it at http://www.posttestserver.com/data/2014/01/22/07.36.181370961643 post body was 0 chars long.
command reference UM1695 22/46 docid025531 rev 5 ok 2.26 at+s.fsc: create a file at+s.fsc creates a ?file? inside the ram of t he module for delivery by the http server. the argument establishes the url path th at must be used in the http get from a remote client to access this file. the file must include a complete http response header plus the document content that will be delivered to the client. the so ftware includes some statically-defined pages that cannot be removed but they can be overridden by creating a file of the same name. to add content to a file see at+s.fsa below. warning: space for files is allocated from available ram in the module and extremely limited. minimize the requirement for these as much as possible. arguments: example: at+s.fsc=/new.html,1024 ok 2.27 at+s.fsa: append to an existing file at+s.fsa appends blocks of data to an existing file. this command accepts data after the at the end of the command line. the host is expected to supply characters of data after the end of the command line. arguments: example: at+s.fsa=/data.json,165 http/1.0 200 ok server: myproduct filename amount of space to allocate for file, max = 4096 bytes 0=html header automatically added 1=html header not added (as by default) filename max-len amount of bytes to be appended to an existing file. the limit of bytes that can be appended depends on the sp ace allocated during the file creation.
docid025531 rev 5 23/46 UM1695 command reference 46 connection: close content-type: application/json { "device" { "name" : "spwf01sx.11", "serial" : "802.11n" } } ok 2.28 at+s.fsd: delete an existing file at+s.fsd deletes an existing f ile by name. static files may not be deleted, only overridden. arguments: example: at+s.fsd=/data.json ok 2.29 at+s.fsl: list ex isting filename(s) at+s.fsl lists the types (i=internal flas h memory, d=ram memory, e=external flash memory), sizes, and names of all the existing files. note: internal flash pages: html header auto matically added, ram memory pages: html header added/not added depending on the parameter, external flash pages: html header added by default (it can be disabled acting on httpd_gen.c included in the fw package, commenting th e "#define append_header") arguments: none example: d 1965 /wifidemo.html i 461 /input_demo.shtml i 180 /message.shtml i 384 /output_demo.html i 614 /index.html i 157 /peers.shtml i 193 /config.shtml i 174 /status.shtml i 212 /404.html i 2022 /firstset.html filename
command reference UM1695 24/46 docid025531 rev 5 i 2898 /remote.html ok 2.30 at+s.fsp: print the conten ts of an existing file at+s.fsp prints the contents of an existing file. arguments: example: at+s.fsp=/t2.json http/1.0 200 ok server: myproduct connection: close content-type: application/json { "device" { "name" : "spwf01sx.11", "serial" : "802.11n" } } ok 2.31 at+s.wifi: enable/disable wi-fi device at+s.wifi allows the radio to be enabled or disabled at runtime. please note that the configuration variable wifi_mode controls the state of the radio at powerup. arguments: 0 or 1, for disabled or enabled, respectively. example: at+s.wifi=0 ok 2.32 at+s.roam: trigger wi -fi reassociation sequence at+s.roam tells the module to disassociate from its current access point and to re-acquire the network. this is particularly useful if the network settings have been changed and a filename offset from where the f ile is printed.optional. lenght in bytes. mandatory if offset is specified.
docid025531 rev 5 25/46 UM1695 command reference 46 reboot is not desired. the function is not active when the module is configured in mini ap mode. arguments: none example: at+s.roam ok 2.33 at+s.gpioc: configure gene ral purpose inputs/outputs at+s.gpioc is used to configure the function of the various gpios on the module. gpios can be configured as inputs or outputs. addi tionally, inputs can be configured to generate an indication when their state changes. hint. use an external pull up/pull down connected to a given gpio to prevent unwanted commutations. arguments: example: at+s.gpioc=7,out ok at+s.gpioc=11,in,b ok 2.34 at+s.gpior: query general purpose input at+s.gpior is used to read the value and th e direction of a previously-configured gpio. arguments: gpio number (0-15 on spwf01sx) gpio number (0-15 on the spwf01sx.11) ?in? or ?out? optional parameter: 0 off r rising edge f falling edge b both rising and falling edges
command reference UM1695 26/46 docid025531 rev 5 example: at+s.gpior=4 gpio 4 = 0,in ok 2.35 at+s.gpiow: set general purpose output at+s.gpiow is used to set the valu e of a previously-configured gpio. arguments: example: at+s.gpiow=7,1 ok 2.36 at+s.fwupdate: perform a firmware update at+s.fwupdate downloads an updated firmware image via a single http get request to the named host and path, much like the at+s.httpget comman d. the spwf01sx.11 will validate the firmwa re image it downloads, load it into a staging area, then prompt the user to issue a reset command in order to complete the update. a restoring of factory default settings (at&f) is mandatory after every fw update. note: command only enabled on the module's versions spwf01sx.1y arguments: example: at+s.fwupdate=host.example.com,/1203-120918_01.ota staging f/w update for 'spwf01sx.11' version '1203-120918_01' f/w length 276824 @ 0x00002800 (offset 0x00000000, block len 4096) write len 4096 -> 0x0 write len 4096 -> 0x1000 write len 4096 -> 0x2000 write len 4096 -> 0x3000 (note - deleted extra output for clarity) write len 4096 -> 0x41000 gpio number (0-15 on the spwf01sx) 0 or 1 for off and on, respectively target host. dns resolvable name or ip address document path and optional query arguments target host port. optional
docid025531 rev 5 27/46 UM1695 command reference 46 write len 4096 -> 0x42000 write len 2476 -> 0x43000 (final) wrote 276904 bytes complete! update will be applied on next reboot. (at+cfun=1) at+cfun=1 +wind:2:reset +wind:17:validating f/w update +wind:17:performing f/w update (note - at this point th e leds will blink rapidly un til update is complete) +wind:17:f/w update complete! +wind:1:poweron (1203-120918_01) 2.37 at+s.httpdfsupdate: update static httpd filesystem at+s.httpdfsupdate downloads an updated file system via a single http get request to the named host and path, much like the at+s.httpget command. the spwf01sx.11 will validate the imag e it downloads, flashes the contents and then prompts the user to issue a reset command in or der to complete the file system update. arguments: example: at+s.httpdfsupdate=host.example.com,/custom_httpdfs.img image length 777 (offset 0x00080000, block len 4096) write len 784 -> 0x80000 (final) wrote 780 bytes complete! please reboot ok 2.38 at+s.httpdfser ase: erase the ex ternal flash memory the httpdfserase allows to erase th e content of the external flash. arguments: 2.39 at+s.httpd: disabl e/enable web server the httpd command enables or disables the module's web server. note: command only available on the module's versions spwf01sx.1y arguments: : 0 to disable, 1 to enable target host. dns resolvable name or ip address document path and optional query arguments target host port
command reference UM1695 28/46 docid025531 rev 5 example: at+s.httpd=0 ok 2.40 at+s.scan: perform site survey (scan) at+s.scan performs an immediate scan for available networks. infrastructure (ap) and ibss(ad-hoc) networks are both reported. network type, channel, bssi d, ssid, signal strength (rssi), and 802.11 capabilities are all repo rted. the module supports the active/passive scan and the filtered/unfilter ed scan. default is active and filtered. note: the automatic scan, performed by the module to connect to the access point, is passive by default. this is done to avoid violating spectr al emission. the switch to active scan only happens when the module finds an ap advertising the country ie. therefore, the current scan policy is not compatib le with band-steering mode. arguments: : perform an active scan (a) or a passive scan (p) : duplicated networks are displayed (unfiltered) example: at+s.scan 1: bss 00:18:74:d3:53:c0 chan: 01 rssi: -85 ssid: 'ambu2' caps: 0431 wpa2 2: bss 00:18:74:d3:53:c3 chan: 01 rssi: -85 ssid: 'pawam' caps: 0431 wpa 3: bss 00:18:74:d3:53:c1 chan: 01 rssi: -85 ssid: 'ambum' caps: 0431 wpa2 4: bss 00:18:74:d3:53:c2 chan: 01 rssi: -84 ssid: 'guest' caps: 0421 5: bss c8:d3:a3:15:98:14 chan: 05 rssi: -79 ssid: 'ambuitguest' caps: 0431 wpa wpa2 wps 6: bss 02:62:1f:51:8f:0b chan: 06 rssi: -41 ssid: 'ciscosb2' caps: 0411 wpa wpa2
docid025531 rev 5 29/46 UM1695 command reference 46 7: bss 00:18:0a:31:ea:78 chan: 11 rssi: -89 ssid: 'zyckoitalywifi' caps: 0531 wpa wpa2 8: bss 00:1f:33:fe:66:17 chan: 11 rssi: -91 ssid: 'tri_agrate' caps: 0411 wpa2 ok at+s.scan=a,r 1: bss 00:18:74:d3:53:c0 chan: 01 rssi: -81 ssid: 'ambu2' caps: 0431 wpa2 2: bss 00:18:74:d3:53:c1 chan: 01 rssi: -80 ssid: 'ambum' caps: 0431 wpa2 3: bss 00:18:74:d3:53:c2 chan: 01 rssi: -81 ssid: 'guest' caps: 0421 4: bss 00:18:74:d3:53:c3 chan: 01 rssi: -81 ssid: 'pawam' caps: 0431 wpa 5: bss 00:18:74:d3:53:c1 chan: 01 rssi: -81 ssid: 'ambum' caps: 0431 wpa2 6: bss 00:18:74:d3:53:c0 chan: 01 rssi: -81 ssid: 'ambu2' caps: 0431 wpa2 7: bss 00:18:74:d3:53:c3 chan: 01 rssi: -80 ssid: 'pawam' caps: 0431 wpa 8: bss 00:18:74:d3:53:c1 chan: 01 rssi: -81 ssid: 'ambum' caps: 0431 wpa2 9: bss c8:d3:a3:15:98:14 chan: 05 rssi: -79 ssid: 'ambuitguest' caps: 0431 wpa wpa2 wps 10: bss 02:62:1f:51:8f:0b chan: 06 rssi: -39 ssid: 'ciscosb2' caps: 0411 wpa wpa2 11: bss 02:62:1f:51:8f:0b chan: 06 rssi: -45 ssid: 'ciscosb2' caps: 0411 wpa wpa2 12: bss 00:1f:33:fe:66:17 chan: 11 rssi: -91 ssid: 'tri_agrate' caps: 0411 wpa2 ok 2.41 at+s.adc: read adc value on gpio8 at+s.adc returns adc value on gpio8, between 0 and 2500 mv. note: measurement accuracy is around 10 mv arguments: : returns raw adc value on gpio8 unprocessed (between 0 and 4096). this argument is optional and when it is not specified the value is returned processed (between 0 and 2500 mv) 2.42 at+s.dac: enable/disable dac on gpio15 the dac command enables dac on gpio15.
command reference UM1695 30/46 docid025531 rev 5 arguments: : must be set in mv (between 1 and 2500), 0 disables dac on gpio15 2.43 at+s.pwm: set pwm on gpio1 the pwm command enables pwm on gpio1 with a specified frequency and duty-cycle. note: the max frequency value (10 khz) allows user to set any duty-cycle between 0 and 100 arguments: : value between 1 and 10 khz, 0 disables pwm on gpi01 : value between 0 and 100 (default=50%)
docid025531 rev 5 31/46 UM1695 configuration variable reference 46 3 configuration variable reference the configuration variable space is split into two areas: production data (pdata) and configuration data. the production data space contains factory-set variables that can be modified in ram (at+s.scfg) but cannot be saved to non-volatile storage. the configuration data space contains variables that can be written in ram (at+s.scfg) and written to non-volatile storage (at&w). additionally, the non-volatile values can be restored to their factory state using the at&f command. variables have the following types: the following table lists the production data variables: the following table lists the configuration data variables: table 3. variable types type code description text[] printable text up to characters hex[] octets, specified in hexadecimal, up to octets int integer ip ip address or netmask, specified as a dotted-quad table 4. production data variables variable sample value type description nv_manuf st text[32] manufacturer id string nv_model spwf01sxyz text[32] manufacturer model string nv_serial 1214003 text[32] ma nufacturer serial number nv_wifi_macaddr 02:4d: 53:4d:00:01 hex[6] manufacturer assigned 802.11 mac address
configuration variable reference UM1695 32/46 docid025531 rev 5 table 5. configuration data variables variable sample value type description blink_led 0 int enable/disable the blinking led (default=0). in miniap, the blinking indicates the number of clients associated to the module. wind_off_low 0x00000000 int wind 0:31 mask 0xffffffff are disabled all the 32 wind indicator wind_off_medium 0x00000000 int wind 32:63 mask wind_off_high 0x00000000 int wind 64:95 mask user_desc anonymous text[64] free form textual field for host use (used as basic authentication during mini ap configuration) escape_seq at+s. text[7] escape sequence from data mode to command mode (max 7 chars) localecho1 1 int echo command input: 0=off, 1=on console1_speed 115200 int serial port speed: from 9600 to 921600, default: 115200 console1_hwfc 0 int hardware flow control: 0=off, 1=on console1_enabled 1 int enable console on uart1 sleep_enabled 0 int enable/disable the sleep mode standby_enabled 0 int enable/disable the standby mode standby_time 10 int standby mode time, in seconds. up to 2 32 -1 sec wifi_tx_msdu_lifetime 0 int msdu lifetime. from 0 to 2^32-1 tus (1 tus= 1024s). zero is default (automatic) wifi_rx_msdu_lifetime 0 int msdu lifetime. from 0 to 2^32-1 tus (1 tus= 1024s). zero is default (automatic) wifi_operational_mode 0x00000011 int allows choosing doze (11) or quiescent (12) power device modes
docid025531 rev 5 33/46 UM1695 configuration variable reference 46 wifi_beacon_wakeup 1 int set the wakeup interval of the wlan device, from 1 to 255 if wifi_listen_interval = 0; from 1 to 65535 if wifi_listen_interval = 1 wifi_beacon_interval 100 int beaconing interval in miniap mode, from 0 to 2^16-1 wifi_listen_interval 0 int define the wakeup mode (0 = sleep up to the beacon_wakeup specified, 1 = sleep at least to the beacon_wakeup specified) wifi_rts_threshold 3000 int frame size over which rts/cts is used. limit: from 0 to 3000 wifi_ssid 50:72:6f:64:75: 63:74:69:6f:6e: 31:00:00:00:00: 00:00:00:00:00: 00:00:00:00:00: 00:00:00:00:00: 00:00 hex[32] desired ssid specified in hex. all 32 octets should be written. note that wifi_ssid_len must also be set. wifi_ssid_len 11 int length of the actual ssid in the 32 byte buffer wifi_txfail_thresh 5 int maximum number of lost packets before disassociation wifi_ht_mode 0 int reserved wifi_channelnum 6 int channel number to use for miniap operation. the user must properly set the channel number to not violate ieee 802.11 wi- fi/wlan standards. table 5. configuration data variables (continued) variable sample value type description
configuration variable reference UM1695 34/46 docid025531 rev 5 wifi_opr_rate_mask 0xffffffff int bit0: 1 mbps bit1: 2 mbps bit2: 5.5 mbps bit3: 11 mbps bit6: 6 mbps bit7: 9 mbps bit8: 12 mbps bit9: 18 mbps bit10: 24 mbps bit11: 36 mbps bit12: 48 mbps bit13: 54 mbps bit14: mcs0 (6.5mbps) bit15: mcs1 (13mbps) bit16: mcs2 (19.5mbps) bit17: mcs3 (26mbps) bit18: mcs4 (39mbps) bit19: mcs5 (52mbps) bit20: mcs6 (58.5mbps) bit21: mcs7 (65mbps) wifi_bas_rate_mask 0x0000000f int basic data rate mask, 0x0000000f is [1,2,5.5,11] wifi_mode 1 int radio mode. 0=idle, 1=sta (supported security modes: open, wep opensystem, wep sharedkey, wpa/wpa2), 2=ibss (supported security modes: open, wep opensystem, wep sharedkey); 3=miniap (supported security modes: open, wep opensystem - supported classes: b,g) wifi_auth_type 0 int authentication type used in ibss mode: 0=opensystem, 1=sharedkey wifi_powersave 1 int allows choosing between active (0), ps (1) or fast- ps (2) wifi_tx_power 18 int transmit power [from 0 to 18], in dbm table 5. configuration data variables (continued) variable sample value type description
docid025531 rev 5 35/46 UM1695 configuration variable reference 46 wifi_rssi_thresh -50 int low signal strength threshold wifi_rssi_hyst 10 int amount of change in rssi to trigger signal state change wifi_ap_idle_timeout 120 int seconds of inactivity to trigger disassociate of the client wifi_beacon_loss_thres h 10 int number of consecutive loss beacon to detect the ap disassociation wifi_priv_mode 2 int privacy mode: 0=none, 1=wep, 2=wpa-personal (tkip/aes) or wpa2- personal (tkip/aes) wifi_wep_keys[0] 00:00:00:00:00: 00:00:00:00:00: 00:00:00:00:00: 00 hex[16] wep key buffer wifi_wep_keys[1] 00:00:00:00:00: 00:00:00:00:00: 00:00:00:00:00: 00 hex[16] wep key buffer wifi_wep_keys[2] 00:00:00:00:00: 00:00:00:00:00: 00:00:00:00:00: 00 hex[16] wep key buffer wifi_wep_keys[3] 00:00:00:00:00: 00:00:00:00:00: 00:00:00:00:00: 00 hex[16] wep key buffer wifi_wep_key_lens 00: 00:00:00 hex[4] four octets specifying the length of the actual key data in each wep key buffer. wifi_wep_default_key 0 int default wep key used for authentication wifi_wpa_psk_raw 00:00:00:00:00: 00:00:00:00:00: 00:00:00:00:00: 00:00:00:00:00: 00:00:00:00:00: 00:00:00:00:00: 00:00 hex[32] pre-calculated psk key table 5. configuration data variables (continued) variable sample value type description
configuration variable reference UM1695 36/46 docid025531 rev 5 wifi_wpa_psk_text a_psk_pass text[64] wpa(2) psk passphrase, if set the actual psk will be generated from this. used in sta, ibss and miniap. ip_use_dhcp 1 int dhcp server on/off. used in sta, ibss and miniap. 0=off (in sta mode: the variables ip_ipaddr, ip_netmask and ip_gw must be properly set to connect to the ap), 1=on (in sta mode: the ipaddr, netmask and gw will be provided by the ap), 2=on&customize (in miniap mode: user can customize the ip_ipaddr of the miniap, the ip_address of the client is automatically assigned by the miniap) ip_use_httpd 1 int http server on/off. 0=off, 1=on ip_mtu 1500 int ip maximum transmission unit size. limit: from 634 to 2412 (1500 for maximum compatibility with ethernet networks) ip_hostname iwm-02-09-97 text[32] ip local hostname ip_apdomainname captiveportal.net text[32] ip domain name in mini ap mode. if the ap domain name is not quickly opened, it?s suggested to turn off an eventual proxy server (check the connection settings of the device or the browser preferences). ip_apredirect firstset.html text[16] default homepage opening the ip_apdomainname in miniap ip_ipaddr 192.168.0.50 ip ip address for static usage (dhcp off) ip_netmask 255.255.255.0 ip ip netmask for static usage (dhcp off) ip_gw 192.168.0.1 ip ip default gateway for static usage (dhcp off) table 5. configuration data variables (continued) variable sample value type description
docid025531 rev 5 37/46 UM1695 configuration variable reference 46 ip_dns 192.168.0.1 ip ip dns server for static usage (dhcp off) ip_http_get_recv_timeo ut 1000 int http_get connection timeout in milliseconds ip_wait_timeout 12000 int amount of time in time_wait state ip_dhcp_timeout 20 int dhcp client timeout, in seconds ip_sockd_timeout 250 int socket server - buffer timeout management (from 5 ms to 250 ms) warning: 250 ms is suggested to avoid data loss table 5. configuration data variables (continued) variable sample value type description
status variable reference UM1695 38/46 docid025531 rev 5 4 status variable reference table 6. status variable variable sample value description version 140128-caf4b79- spwf01s spwf01s software version reset_reason 2 h/w reported reason for last reset 0 = power_on 1 = watchdog 2 = soft reset 3 = low power conf_flag 5 module hw revision system_uptime 22006 system running time in seconds system_sleeptime 500 system sleeping time in seconds gpio_enable 0 interrupt-enabled gpio bitmask, expressed in base 10 captiveportal 1 mini ap enabled/disabled wifi_state 10 0= hardware power up 1=hardware failure 2=radio task terminated by user 3=radio idle 4=scan in progress 5=scan complete 6=join in progress 7=joined 8=access point started 9=802.11 handshake complete 10=ready to transmit data (i.e. ?link up?) wifi_bssid 00:18:f8:3c:d9:18 bssi d of current association wifi_aid 0 association id of current association wifi_channelnum 11 current radio channel number wifi_sup_rate_mask 0x003fffcf radio: supported data rate mask wifi_bas_rate_mask 0x0000000f ap reported: basic data rate mask wifi_chan_activity2 0x00003fff channels where we are allowed to transmit. channel mask. i.e. 0x00003fff => from channel 0 to channel 13 wifi_max_tx_power 18 max allowed transmit powe r for the defined reg domain wifi_reg_country it current regulatory domain wifi_dtim_period 1 ap reported dtim period (used in sta mode) wifi_sleeping 0 radio sleeping state (0 = active, 1 = sleep)
docid025531 rev 5 39/46 UM1695 status variable reference 46 wifi_num_assoc 1 number of the client associated to the module ip_ipaddr 192.168.121.184 current ip address ip_netmask 255.255.252.0 current ip netmask ip_gw 192.168.123.20 current ip default gateway ip_dns 192.168.123.20 current ip dns server ip_sock_open 0 bitmask of socket client id currently opened, expressed in base 10 (ip_sock_open=13 (00001101 in binary), means that socket#0 socket#2 and socket#3 are currently opened) ip_sockd_port 0 socket server port opened free_heap 30472 current free heap space min_heap 26552 minimum free heap space thus far current_time 90643 current time in seconds table 7. peers table variable sample value description link_id 0 identifier of the client state 4 0 = hardware power up 1 = hw link initialization 2 = client link identifier allocated 3 = authenticated 4 = associated 5 = peer lost beacons 6 = peer in power save state addr 90:18:7c:96:0d:0b mac address of the client last_rx 21244 timestamp of last received packet last_tx 21244 timestamp of last transmitted packet rx_drops 0 count of frames dropped during reception tx_drops 1 count of frames dropped during transmission rx_pkts 50 count of received frames tx_pkts 44 count of transmitted frames tx_errs 0 count of errors det ected during frame transmit rate_mask 0x00003fcf ap reported operational data rate mask cur_rate_idx 3 most significan t byte of the rate_mask cur_rate_ok 5 counter to perform rate step up cur_rate_fail 0 counter to perform rate step down tx_consec_fail 0 counter to perform disassociation table 6. status variable (continued) variable sample value description
status variable reference UM1695 40/46 docid025531 rev 5 rx_seqnum 0x0000af40 sequence number of last rx directed frame rx_seqnum_mc 0x00000000 sequence number of last rx multicast frame rx_rssi -37 signal strength of last received packet rx_rateidx 0 rate index of last received packet setprot 0 bitmask to indicate prot ection for tx (bit 1) and/or rx (bit 0) ieee 802.11 frames listen_interval 10 ap repor ted listen interval capinfo 0x00000000 information about the ap capabilities table 7. peers table (continued) variable sample value description
docid025531 rev 5 41/46 UM1695 asynchronous indication reference 46 5 asynchronous indication reference spwf01sx modules can output asynchronous indications at any time except while an at command is in progress. the format for all asynchronous indications is: +wind:: table 8. asynchronous indication messages indication notes +wind:0:console active console task is running and can accept at commands +wind:1:poweron ( %s ) initial pow erup indication, with f/w version +wind:2:reset system reset is being asse rted/triggered +wind:3:watchdog running watchdog task initialized and running +wind:4:heap too small selected heap allocation is too small for normal operation +wind:5:wifi hardware failure: %d wifi radio failure, reset pending +wind:6:watchdog terminating, reset pending watchdog reset asserted +wind:7:systickconfigure failure to configure system tick clock +wind:8:hard fault os hard fault detected +wind:9:stackoverflow os stack overflow detected +wind:10:mallocfailed (%d/%d) os heap a llocation failed (requiredsize/freespace) +wind:11: radio initialization failure +wind:12:wifi ps mode failure: %s:%d radio failed to enter power saving state (%s=step, %d=state) +wind:13: copyright information of spwf01sx +wind:14:wifi bss regai ned radio regai ned associati on after loss +wind:15:wifi signal low (%d) radi o low signal threshold triggered +wind:16:wifi signal ok (%d) radio signal level recovered +wind:17:f/w update firmware update in progress +wind:18:keytype %d not implemented encryption key type not recognized +wind:19:wifi join: %m bss join successful, %m=bssid +wind:20:joinfailed: %04x bss join failed, %x = status code +wind:21:wifi scanning radio is scanning for a bss t hat matches the currently configured ssid. (note: wind hidden when fast reconnect (1) is performed) +wind:22:scanblewup radio failed to accept scan command +wind:23:scanfailed: %04x radio failed to execute scan command +wind:24:wifi up: %i radio has successfully connected to a bss and initialized the ip stack. %i=ip address
asynchronous indication reference UM1695 42/46 docid025531 rev 5 +wind:25:wifi association with '%s' successful radio successfully asso ciated to the ?%s? bss +wind:26:wifi starte d ap with network ?%d? radio successfully started the mini ap, where %d=network ssid +wind:27:startfailed: %04x radio failed to start the mini ap,%x=status code +wind:28:station %m associated: %d client associated to the module in mini ap,%m=bssid, %d=peers assoc status (0=default, 1=client re- association) +wind:29:dhcp reply for %i/%m dhcp reply sent for the client,%i = client ip address,%m = client mac address +wind:30:wifi bss lost beacon missed from the bss +wind:31:wifi exception: radio reported an internal exception. radio is non- functional from this point; user must reboot the module. +wind:32:wifi hardware started radio repor ts successful internal initialization +wind:33:wifi network lost connection to bss lost due to excessive beacon misses +wind:34:wifi unhandled event: %d unhandled internal event occurred,%d=identifier of the event occurred +wind:35:scan complete:0x%x scan complete indication,% x=result code (0: scan ok; 1: scan error). note: wind hidden when fast reconnect ( 1 ) is performed). +wind:36:wifi unhandled ind (%02x) : unparsed radio indication occurred +wind:37:wifi unhandled (%d) : unhandled radio response message received +wind:38:wifi: powered down r adio and radio thread shut down +wind:39:hw in miniap mode (gpio7 low) module started in miniap mo de (ssid = iwm-xx-yy-zz, where xxyyzz are the last 6 digits of mac address) +wind:40:wifi de authentication: %d radio: access point sent deauthentication, :%d=reason code (802.11 deauthentication reason code) +wind:41:wifi di sassociation: %d radio: access point sent disassociation, :%d=reason code (802.11 disassociation reason code) +wind:42:rx_mgmt: %04x unhandled management frame subtype received +wind:43:rx_data: %04x unhandled data frame subtype received +wind:44:rx_unk: %04x unha ndled frame type received +wind:45:dot11 authille gal illegal authentication type detected +wind:46:wpa: crunching psk... creating psk from psk passphrase +wind:47:wpa:%s factory debug +wind:48:wpac:%s factory debug +wind:49:wpa:terminated: %d wp a supplicant thread terminated table 8. asynchronous indication messages (continued) indication notes
docid025531 rev 5 43/46 UM1695 asynchronous indication reference 46 +wind:50:wpa supplicant failed to initialize. wpa supplicant thread initialization failed +wind:51:wpa handshake complete wpa 4-way handshake successful +wind:52:gpio%d %d gpio line changed state (%d=gpio changed, %d=gpio logic state +wind:53:wakeup (gpio6 high) device woke n up from sleep from external signal +wind:54:etf %04d factory debug +wind:55:pending data:%d:%d pending data from the socket, %d =socket identifier:%d=pending byte available for reading +wind:56:insert message to client:%d input_demo indicator, displayed when the ?input_demo.shtml? page is requested by a client, %d is the nth input ssi into html page +wind:57: firstset indicator, displayed during the remote configuration of the module +wind:58:socket closed:%d" s ocket closed, %d = iden tifier of the socket +wind:59:back to command mode command mode is active (after the escape sequence) +wind:60:now in data mode data mode is active +wind:61:incoming socket client:%i socket client is connected to the module, %i = client ip address +wind:62:socket client gone:%i socket client disconnected, %i = client ip address +wind:63:sockd dropping data:%d:%d data dropped due to low memory, %d=bytes dropped, %d=free heap +wind:64:sockd pending data:%c:%d:%e data pending while module is in command mode, %c = number of message received, %d = bytes received in the last message, %e = tot bytes received +wind:65:hw factory reset (gpio0 high) factory variables are restored via gpio0 +wind:66:low power mode enabled:%d power save mode enabled, %d = 1 for ps or 2 for fast- ps +wind:67:going into standby:%d standby mode enabled, %d is time in sec +wind:68:resuming from standby standby mode disabled +wind:69:going into deepsleep sleep mode enabled +wind:70:resuming from deeps leep sleep mode disabled +wind:71:dns reply for %d dns reply from miniap to th e client, %d = client ip address +wind:72:station %m disassociated: %d" client dissociated to the module in mini ap, %m=bssid, %d=reason code (802.11 deauthentication reason code) +wind:73:system conf iguration updated (run at&w to save it) the configuration variabl es have been updated, it needs an at&w to save it (this wind is usually shown when an old fw version is updated) table 8. asynchronous indication messages (continued) indication notes
asynchronous indication reference UM1695 44/46 docid025531 rev 5 +wind:74:rejected found network a new scan needs to be scheduled due to a mismatch between spwf configuration variables and access point configuration +wind:75:rejected association:yyy indicates an associ ation failure (yyy=low memory, reject status code) +wind:76:authentication timed out indicates th at the authentication process is timed out +wind:77:association timed ou t indicates that the associ ation process is timed out +wind:78:mic failure michael mic error is detected by the local driver 1. fast reconnect feature: allows fast reconnect to the last associated ap table 8. asynchronous indication messages (continued) indication notes
docid025531 rev 5 45/46 UM1695 revision history 46 6 revision history table 9. document revision history date revision changes 05-dec-2013 1 initial release. 23-jun-2014 2 major review for alignment with commands and variables introduced in the release 3.1 of ?at full stack? 08-oct-2014 3 minor changes. 28-nov-2014 4 ? deleted the appendix a. ? minor changes related to fix introduced in the release 3.3. 21-may-2015 5 changes throughout the document related to features introduced in release 3.4 of the ?at full stack?. (see table 1 ).
UM1695 46/46 docid025531 rev 5 important notice ? please read carefully stmicroelectronics nv and its subsidiaries (?st?) reserve the right to make changes, corrections, enhancements, modifications, and improvements to st products and/or to this document at any time without notice. purchasers should obtain the latest relevant in formation on st products before placing orders. st products are sold pursuant to st?s terms and conditions of sale in place at the time of o rder acknowledgement. purchasers are solely responsible for the choice, selection, and use of st products and st assumes no liability for application assistance or the design of purchasers? products. no license, express or implied, to any intellectual property right is granted by st herein. resale of st products with provisions different from the information set forth herein shall void any warranty granted by st for such product. st and the st logo are trademarks of st. all other product or service names are the property of their respective owners. information in this document supersedes and replaces information previously supplied in any prior versions of this document. ? 2015 stmicroelectronics ? all rights reserved


▲Up To Search▲   

 
Price & Availability of UM1695

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X